﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Okuma.CLDATAPI.DataAPI;
using Okuma.CLDATAPI.Enumerations;
using OpenNETCF.MTConnect;

namespace Okuma
{
    public class Tailstock : ToolPart
    {
        private CTailStock m_tailstock;

        internal Tailstock(SubSystemEnum subSystem)
            : base(subSystem)
        {
            m_tailstock = new CTailStock(subSystem);
        }

        public override string Name
        {
            get { return "Tailstock"; }
        }

        public override ComponentType ComponentType
        {
            get { return ComponentType.Tailstock; }
        }

        [SampleDataItem(UnitValues.Millimiter, // TODO: verify this
            ItemType = DataItemType.POSITION)]        
        public double SpindlePosition
        {
            get { return m_tailstock.GetTailstockSpindlePosition(); }
        }
    }
}
